import request from '@/router/axios';

// 计算价格
export const getUUOrderPrices = (query) => {
  return request({
    url: '/api/xmbz-uu/uu-api/v1/getOrderPrices',
    method: 'get',
    params: query
  })
}

// 提交订单
export const submitUUOrder = (query) => {
  return request({
    url: '/api/xmbz-uu/uu-api/v1/submit',
    method: 'post',
    params: query
  })
}

// 获取订单
export const getUUOrders = (query) => {
  return request({
    url: '/api/xmbz-uu/uu-api/v1/list',
    method: 'get',
    params: query
  })
}

// 取消订单
export const cancelUUOrder = (query) => {
  return request({
    url: '/api/xmbz-uu/uu-api/v1/cancel',
    method: 'post',
    params: query
  })
}

// 取消订单
export const uuStatusList = () => {
  //1下单成功 3跑男抢单 4已到达 5已取件 6到达目的地 10收件人已收货 -1订单取消
  return [
    {status: 1, statusName: '下单成功'},
    {status: 3, statusName: '跑男抢单'},
    {status: 4, statusName: '已到达'},
    {status: 5, statusName: '已取件'},
    {status: 6, statusName: '到达目的地'},
    {status: 10, statusName: '收件人已收货'},
    {status: -1, statusName: '订单取消'}
  ]
}

/**
 *  京东物流 
 * **/ 

//  京东 提交订单  xmbzNos userName
 export const JDsubmit = (query)=>{
   return request({
     url:"/api/xmbz-jd-logistics/jd-api/v1/submit",
     method: 'post',
     params: query
   })
 }

//  京东 确认拒收或退回货物摁钮  xmbzNo  userName
export const JDretreat = (query) => {
  return request({
    url: '/api/xmbz-jd-logistics/jd-api/v1/inboundOrder',
    method: 'post',
    params: query
  })
}

// 京东 取消发布订单 xmbzNo  cancelReasonId(退回原因) reason(备注)
export const cancellationOrder = (query) => {
  return request({
    url: '/api/xmbz-jd-logistics/jd-api/v1/cancel',
    method: 'post',
    params: query
  })
}

// 京东 物流订单列表 
export const logisticsList = (query) => {
  return request({
    url: '/api/xmbz-jd-logistics/jd-api/v1/list',
    method: 'post',
    params:query,
  })
}

// 京东 日志 
export const  showDaytitle = (query) => {
  return request({
    url: '/api/xmbz-jd-logistics/jd-api/v1/log',
    method: 'post',
    params: query,
  })
}  